<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="查询条件" namespace="maintainanceTaskDetails"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                                v-on:click="_moreCondition()">
                            {{maintainanceTaskDetailManageInfo.moreCondition == true?'隐藏':'更多'}}
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入保养人','maintainanceTaskDetails')"
                                       v-model="maintainanceTaskDetailManageInfo.conditions.planUserName"
                                       class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入实际保养开始时间','maintainanceTaskDetails')"
                                       v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceStartTime"
                                       class=" form-control startTime">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入实际保养结束时间','maintainanceTaskDetails')"
                                       v-model="maintainanceTaskDetailManageInfo.conditions.maintainanceEndTime"
                                       class=" form-control endTime">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm"
                                    v-on:click="_queryMaintainanceTaskMethod()">
                                <i class="fa fa-search"></i>
                                <span><vc:i18n name="查询" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </button>
                            <button type="button" class="btn btn-primary btn-sm"
                                    v-on:click="_resetMaintainanceTaskMethod()">
                                <i class="fa fa-repeat"></i>
                                <span><vc:i18n name="重置" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                    <div class="row" v-show="maintainanceTaskDetailManageInfo.moreCondition == true">
                        <div class="col-sm-3">
                            <select class="custom-select"
                                    v-model="maintainanceTaskDetailManageInfo.conditions.maintainancePlanId">
                                <option selected value="">{{vc.i18n('请选择保养计划','maintainanceTaskDetails')}}</option>
                                <option v-for="(item,index) in maintainanceTaskDetailManageInfo.plans"
                                        :key="index" :value="item.planId">
                                    {{item.planName}}
                                </option>
                            </select>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入任务详情ID','maintainanceTaskDetails')"
                                       v-model="maintainanceTaskDetailManageInfo.conditions.taskDetailId"
                                       class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <select class="custom-select" v-model="maintainanceTaskDetailManageInfo.conditions.taskState">
                                <option selected value="">{{vc.i18n('请选择任务状态','maintainanceTaskDetails')}}</option>
                                <option v-for="(item,index) in maintainanceTaskDetailManageInfo.taskStates" :key="index"
                                        :value="item.statusCd">{{item.name}}
                                </option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <span><vc:i18n name="保养明细信息" namespace="maintainanceTaskDetails"></vc:i18n></span>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportExcel()">
                            <i class="fa fa-plus"></i>
                            <span><vc:i18n name="导出" namespace="maintainanceTaskDetails"></vc:i18n></span>
                        </button> -->
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                        <tr>
                            <th class="text-center">
                                <span><vc:i18n name="编号" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="设备名称" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="计划名称" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="保养标准" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="计划保养人" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="保养人" namespace="maintainanceTaskDetails"></vc:i18n></span><br/>
                                <span><vc:i18n name="开始/结束时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="实际保养时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="实际保养人" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="任务状态" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="保养情况" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="保养照片" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="创建时间" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                            <th class="text-center">
                                <span><vc:i18n name="操作" namespace="maintainanceTaskDetails"></vc:i18n></span>
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="maintainanceTask in maintainanceTaskDetailManageInfo.maintainanceTasks">
                            <td class="text-center">{{maintainanceTask.taskDetailId}}</td>
                            <td class="text-center">{{maintainanceTask.machineName}}</td>
                            <td class="text-center">{{maintainanceTask.planName}}</td>
                            <td class="text-center">{{maintainanceTask.standardName}}</td>
                            <td class="text-center">{{maintainanceTask.planUserName}}</td>
                            <td class="text-center">{{maintainanceTask.planInsTime}}<br/>{{maintainanceTask.planEndTime}}</td>
                            <td class="text-center">{{maintainanceTask.inspectionTime ? maintainanceTask.inspectionTime : '-'}}</td>
                            <td class="text-center">{{maintainanceTask.actUserName ? maintainanceTask.actUserName : '-'}}</td>
                            <td class="text-center">{{maintainanceTask.stateName}}</td>
                            <td class="text-center text-primary">
                                {{maintainanceTask.description ? maintainanceTask.description : '-'}}
                            </td>
                            <td class="text-center" style="white-space: nowrap;">
                                    <span v-for="_photo in maintainanceTask.photos">
                                    <img style="width: 60px; height: 60px;" v-bind:src="_photo.url"
                                         v-on:click="openFile(_photo)"/>
                                </span>
                            </td>
                            <td class="text-center">{{maintainanceTask.createTime}}</td>
                            <td class="text-center">
                                <a :href="'/#/pages/property/maintainanceTaskDetailView?taskDetailId='+maintainanceTask.taskDetailId">详情</a>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="17">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <vc:create path="common/viewMap"></vc:create>
    <vc:create path="common/viewImage"></vc:create>
</div>
